package com.pxmeta.order.entity;


import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@TableName("kt_order")
@ApiModel(value = "订单对象", description = "订单表")
@Data
public class Order implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("用户id")
    private Long userId;

    @ApiModelProperty("订单号")
    private String orderNo;

    @ApiModelProperty("商品id")
    private Long productId;

    @ApiModelProperty("appStore 商品id")
    private String appStoreProductId;

    @ApiModelProperty("订单总金额")
    private BigDecimal totalPrice;

    @ApiModelProperty("交易收据")
    private String receipt;

    @ApiModelProperty("苹果交易id")
    private String transactionId;

    @ApiModelProperty("订单状态")
    private Integer status;

    @ApiModelProperty(value = "支付类型")
    private String type;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}
